package com.dc.business.datacollectbusiness.controller;

import com.dc.business.datacollectbusiness.model.Result;
import com.dc.business.datacollectbusiness.service.publicInstitutionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.io.InputStream;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Properties;


@RestController
@CrossOrigin
@RequestMapping("/api/testPublic")
@Slf4j
@Component
public class publicInstitutionController {

    @Autowired
    private publicInstitutionService institutionService;


    // 远端调用数据传输存储接口
    @PostMapping("/sendDataToStorage")
    public Result sendDataToStorageTest() throws Exception {
        HashMap<Long, String> resultMap = institutionService.sendDataToStorageMap();
        return Result.success(resultMap);
    }

}
